package org.dudemonkey.jvm.javawentidingwei.aboutlock;

import org.dudemonkey.jvm.concurrency.util.PrintUtil;

import java.util.Map;

public class SubWaitThreadIface implements Runnable {
    private Map slock = null;




    public SubWaitThreadIface() {
//        this.slock=null;
    }

    public SubWaitThreadIface(Map slock ) {
        this.slock=slock;

    }


    @Override
    public void run() {
        PrintUtil.sleep(5);
        synchronized (slock){
            for (int i = 50; i < 55 ; i++) {
                PrintUtil.sleep(1);
                slock.put(this.getClass().getName()+i,"v:"+i);
            }

        }
        PrintUtil.printContent(slock);
    }
}
